<?php
class Search{
	//properties
	private $query;
	//Getters
	public function query(){return $this->query;}
	
	public function __construct ($query){
		$this->query = $query;
	}
	
	public static function get($q){
		$searchResults = array();
		//$searchTerms = explode(' ', $q);
		
		$searchTerms = mysql_real_escape_string(htmlspecialchars(trim($q)));
		
		//check : http://omiossec.developpez.com/mysql/fulltext/etudes/
		//http://www.iamcal.com/publish/articles/php/search/
		
		$mysqli = Frank::mysqliConnect();
		$searchResults['experience'] = Experience::search($searchTerms);
		/*$searchResults['education'] = Education::search($searchTerms);
		$searchResults['skill'] = Skill::search($searchTerms);
		$searchResults['interest'] = Interest::search($searchTerms);*/
		
		
		return $searchResults;
	}
	
	public static function getBooleanQueryFulltext($q, $fields){
		
	}
}
?>